package com.peas.platform.module.icims.budget.archives.adapter.repository.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.peas.platform.common.core.annotation.Comment;
import com.peas.platform.framework.mybatisplus.po.BasePo;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.ibatis.type.JdbcType;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

// 主管部门
@Data
@EqualsAndHashCode(callSuper = false)
@TableName(value = "`tbl_budget_competent`")
public class BudgetCompetentPo extends BasePo {

    // 主管部门编码
    @Comment(value = "主管部门编码")
    @Size(max = 100, message = "主管部门编码不能超过100个字符")
    @TableField(value = "`code`", jdbcType = JdbcType.VARCHAR)
    private String code;

    // 主管部门名称
    @Comment(value = "主管部门名称")
    @NotBlank(message = "主管部门名称不能为空")
    @Size(max = 200, message = "主管部门名称不能超过200个字符")
    @TableField(value = "`name`", jdbcType = JdbcType.VARCHAR)
    private String name;

    // 主管部门联系人
    @Comment(value = "主管部门联系人")
    @Size(max = 20, message = "主管部门联系人不能超过20个字符")
    @TableField(value = "`contact`", jdbcType = JdbcType.VARCHAR)
    private String contact;

    // 主管部门联系电话
    @Comment(value = "主管部门联系电话")
    @NotBlank(message = "主管部门联系电话不能为空")
    @Size(max = 20, message = "主管部门联系电话不能超过20个字符")
    @TableField(value = "`telephone`", jdbcType = JdbcType.VARCHAR)
    private String telephone;

    // 状态
    // 1:有效，0:无效
    // 枚举取值:CommonEnableDisable
    @Comment(value = "状态", enumType = "CommonEnableDisable")
    @Size(max = 20, message = "状态不能超过20个字符")
    @TableField(value = "`state`", jdbcType = JdbcType.VARCHAR)
    private String state;

}
